fix: add tooltips to display full file paths on truncated filenames in chatview #8797
+23
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
Closes: #8278
Description
This PR fixes the filename truncation issue in file editing/reading notices by adding tooltips that display the full file path on hover.
Implementation details:
StandardTooltipcomponents wrapping file path displays in three locations:CodeAccordian.tsx- General file path headers and custom headersChatRow.tsx- Single file read/edit operationsBatchFilePermission.tsx- Batch file permission requestsclassName="text-wrap max-w-[min(300px,100vw)]"to:text-balanceCSS (which was causing excessive whitespace)break-wordsCSS for natural line breaking at path separatorsKey design choices:
text-wrapinstead oftext-balanceto minimize whitespace while maintaining readabilitymax-w-[min(300px,100vw)]instead of a fixed width to prevent tooltip cutoff in narrow panels while maintaining a reasonable max widthReviewers should note:
TooltipProviderandStandardTooltipcomponents)Test Procedure
Manual testing steps:
Test truncated paths show tooltips:
src/components/chat/file/with/deeply/nested/structure.tsx)Test all tooltip locations:
Testing environment:
Pre-Submission Checklist
Screenshots / Videos
Before: Filename truncated, no tooltip on hover.
After: Tooltip on hover.
Documentation Updates
Get in Touch
Discord:
@ocean.smithImportant
Adds tooltips to display full file paths on truncated filenames in
CodeAccordian.tsx,ChatRow.tsx, andBatchFilePermission.tsx, ensuring responsive and consistent styling.StandardTooltipto display full file paths on hover for truncated filenames inCodeAccordian.tsx,ChatRow.tsx, andBatchFilePermission.tsx.text-wrapandmax-w-[min(300px,100vw)]for responsive width and minimal whitespace.text-wrapinstead oftext-balanceto reduce whitespace.TooltipProviderandStandardTooltip.This description was created by
for 643090c. You can customize this summary. It will automatically update as commits are pushed.